package com.csun.cmny.provider.model.service;

import com.csun.cmny.provider.model.service.hystrix.UacMqMessageApiHystrix;
import com.csun.cmny.provider.model.service.hystrix.UacRoleFeignApiHystrix;
import com.csun.cmny.provider.model.vo.RpcRoleVo;
import com.csun.cmny.security.feign.OAuth2FeignAutoConfiguration;
import com.csun.cmny.util.wrapper.Wrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-05-31 13:54
 * @Description: the interface uac role feign api
 */
@FeignClient(value = "cmny-provider-uac", configuration = OAuth2FeignAutoConfiguration.class, fallback = UacRoleFeignApiHystrix.class)
public interface UacRoleFeignApi {

    /**
     * 超时token更新为离线.
     *
     * @return the wrapper
     */
    @PostMapping(value = "/api/uac/role/queryRoleListByUserId")
    Wrapper<List<RpcRoleVo>> queryRoleListByUserId(@RequestParam("userId") Long userId);
}
